var MW = MW || {};
// debug
MW.DEBUG = 1;
// order
MW.MORDER={
    "MAP":0,
    "TOWER":5,
    "ENEMY":10,
    "TARGET":15,
    "TPROXY":20
}
// effect
MW.EFFECTS = {
    ENEMY_BORN : [],
    ENEMY_DEAD : []
};

ClearBuffer = function(){
    var length = MW.EFFECTS.ENEMY_BORN.length;
    for( var i=0;i<length;i++){
        var bullet = MW.EFFECTS.ENEMY_BORN[i];
        bullet.removeFromParent(true);
    }
    MW.EFFECTS.ENEMY_BORN.splice(0,length);
    length = MW.EFFECTS.ENEMY_DEAD.length;
    for( var i=0;i<length;i++){
        var bullet = MW.EFFECTS.ENEMY_DEAD[i];
        bullet.removeFromParent(true);
    }
    MW.EFFECTS.ENEMY_DEAD.splice(0,length);
}